<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:65:"/var/www/html/CRM/public/../application/admin/view/desk/desk.html";i:1541083095;}*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>前台管理</title>
<link rel="stylesheet" type="text/css" href="/admin/css/css.css" />
<script type="text/javascript" src="/admin/js/jquery.min.js"></script>
</head>
<style>
	.uploadBox{
        display: none;
        width: 360px;
        margin: 30px auto 0;
    }
	.buttone{
		display: inline-block;
		padding: 1% 1.5%;
		color: white;
		background: #47a4e1;
		border: none;
		border-radius: 4px;
		position:relative;
		z-index: -1;
		font-size: 14px;
	}
	.pagination>li{
		float: left;
		text-align: center;
		border-radius: 5px;
	}
	.pagination>li:hover{
		background-color: #47a4e1;
	}
	.pagination>li:hover>span{
		color: white;
	}
	.pagination>li>a{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination>li>span{
		display: inline-block;
		width: 66px;
		line-height: 2rem;
		color: #47a4e1;
		font-weight: bold;
		font-size: 18px;
	}
	.pagination>li.disabled{
		border-radius: 5px;
		border: 1px solid #CCCCCC;
	}
	.pagination{
		width:50%;
		height: 100%;
		margin: 0 auto;
	}
	.option{
		margin: 10px 0;
	}
	.submit{
		display: inline-block;
		border: none;
		outline: none;
		width: 70px;
		height: 30px;
		background-color: #47a4e1;
		line-height: 25px;
		color: #fff;
		cursor: pointer;
		text-align: center;
	}

</style>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="/admin/img/coin03.png" /><span><a href="#">前台管理</a>&nbsp;-&nbsp;-</span>&nbsp;前台管理
			</div>
		</div>

		<div class="page">
			<!-- user页面样式 -->
			<div class="connoisseur">
				<!--<promotionuser 表格 显示 &ndash;&gt;-->
				<div class="conShow">
					<div class="option cfD">
						<!--<input type="button" value="批量分配" class="submit" onclick="batch_allot()" style="margin-right: 20px">-->
						<form action="<?php echo url('admin/desk/search'); ?>" method="post">
							<input type="text" class="vinput" name="job_phone" placeholder="请输入电话号码" />
							<input type="submit" value="搜索" class="submit" >
						</form>
					</div>
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="66px" class="tdColor tdC">序号</td>
							<td width="100px" class="tdColor">姓名</td>
							<td width="120px" class="tdColor">联系电话</td>
							<td width="120px" class="tdColor">应聘职位</td>
							<td width="80px" class="tdColor">学历</td>
							<td width="120px" class="tdColor">专业</td>
							<td width="180px" class="tdColor">渠道来源</td>
							<td width="80px" class="tdColor">邀约人</td>
							<td width="150px" class="tdColor">面试时间</td>
							<td width="80px" class="tdColor">是否到达</td>
							<td width="200px" class="tdColor">操作</td>
						</tr>
						<?php foreach($info as $key=>$vo): ?>
						<tr height="40px">
							<td><?php echo $key+1; ?></td>
							<td><?php echo $vo['job_name']; ?></td>
							<td><?php echo $vo['job_phone']; ?></td>
							<td><?php echo $vo['job_work']; ?></td>
							<td><?php echo $vo['job_education']; ?></td>
							<td><?php echo $vo['job_major']; ?></td>
							<td><?php echo $vo['job_source']; ?></td>
							<td><?php echo $vo['job_getman']; ?></td>
							<td><?php if($vo['job_jointime']==''): else: ?>
								<?php echo date("Y-m-d",$vo['job_jointime']); endif; ?>
							</td>
							<td>
								<?php if($vo['job_get_sn']=="是"): ?>
								<a  style="color: green;cursor:not-allowed"  ><?php echo $vo['job_get_sn']; ?></a></td>
								<?php else: ?>
								<a onclick="isCome(this,'<?php echo $vo['job_id']; ?>')" title="点击切换状态" style="color: #999"  href="javascript:;"><?php echo $vo['job_get_sn']; ?></a>
								<?php endif; ?>
							</td>
							<td>
								<?php if($vo['job_get_sn']=="是" and $vo['job_inter_man']==""): ?>
								<a onclick="allot('<?php echo $vo['job_id']; ?>')"  href="javascript:;"><button class="buttone">分配</button></a>
								<?php elseif($vo['job_get_sn']=="否"): ?>
								<a onclick="allot(-1)" href="javascript:;"><button class="buttone">分配</button></a>
								<?php else: ?>
								<a onclick="allot(-2)" href="javascript:;"><button class="buttone">分配</button></a>
								<?php endif; ?>
								<a class="select" onclick="detaile('<?php echo $vo['job_id']; ?>')" href="javascript:;"><button class="buttone">查看详情</button></a>
							</td>
						</tr>

						<?php endforeach; ?>
					</table>
					<?php if(count($info)<=0): ?>
					<p style="text-align: center;color: #999;margin-top: 5px;">暂无数据...</p>
					<?php endif; ?>
					<div class="paging" style="margin-top: 20px; height: 2rem;">
						<?php echo $info->render(); ?>
					</div>
				</div>
				<!--<promotionuser 表格 显示 end&ndash;&gt;-->
			</div>
			<!-- user页面样式end -->
		</div>

	</div>


	<!-- 删除弹出框 -->
	<!--<div class="banDel">-->
		<!--<div class="delete">-->
			<!--<div class="close">-->
				<!--<a><img src="/admin/img/shanchu.png" /></a>-->
			<!--</div>-->
			<!--<p class="delP1">你确定要删除此条记录吗？</p>-->
			<!--<p class="delP2">-->
				<!--<a id="yes" href="javascript:;" class="ok yes">确定</a><a class="ok no">取消</a>-->
			<!--</p>-->
		<!--</div>-->
	<!--</div>-->
	<!-- 删除弹出框  end-->
    <!-- 导入信息框 -->
    <div class="uploadBox" id="upload">
        <form action="<?php echo url('admin/excelud/upload_excel'); ?>" method="post" enctype="multipart/form-data" >
            <input type="file" name="excel"/>
            <input type="submit" value="导入信息" />
        </form>
    </div>
    <!-- 导入信息框 end-->
	<!-- 上传附件框 -->
	<div class="uploadBox" id="uploadword">
		<form action="<?php echo url('admin/excelud/upload_word'); ?>" method="post" enctype="multipart/form-data" >
			<input type="hidden" value="1" name="job_id"/>
			<input type="file" name="word"/>
			<input type="submit" value="上传附件" />
		</form>
	</div>
	<!-- 上传附件框 end-->
</body>
<script src="/admin/layer/layer.js"></script>
<script type="text/javascript">
// 广告弹出框
$(".delban").click(function(){
    var that = $(this);
	var id = that.data('id');
    $(".banDel").show();
	$('#yes').unbind("click").click(function () {
        $(".banDel").hide();
        $.post('<?php echo url("admin/spread/del"); ?>',{'job_id':id},function (data) {
            if(data==200){
                that.parent().parent().remove();
                layer.msg('删除成功！');
            }else{
                layer.msg('删除失败！');
            }
        })
    })
});
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
//删除
// 广告弹出框 end
//    导入信息弹出框
    $('.upload').click(function () {
        layer.open({
            type: 1,
            title: '导入信息',
            closeBtn: 0,
            area: ['400px', '215px'],
            shadeClose: true,
            content: $('#upload')
        });
    })
//    导入信息弹出框

$('.word').click(function () {
    layer.open({
        type: 1,
        title: '上传简历',
        closeBtn: 0,
        area: ['400px', '215px'],
        shadeClose: true,
        content: $('#uploadword')
    });
})
//查看详情
function detaile(id){
    layer.open({
        type:2,
        area: ['700px', '450px'],
        fixed: true, //不固定
        maxmin: true,
        content: "<?php echo url('admin/desk/test'); ?>?job_id="+id
    });
}
//分配
function  allot(id){
    if(id==-1){
        layer.msg('学员到达后才能进行分配',{icon: 5, time: 1500})
	}else if(id==-2){
		layer.msg('不能重复分配哦',{icon: 5, time: 1500})
	}else{
        layer.open({
            type:2,
            title:'分配人员',
            area: ['500px', '350px'],
            fixed: false, //不固定
            maxmin: true,
            content: "<?php echo url('admin/desk/allot'); ?>?job_id="+id,
        });
	}

}
// 修改到达状态
	function isCome(that,id) {
        var that = $(that);
        var sn = that.text();
        layer.confirm('确认学员已到达！', function () {
            $.post("<?php echo url('admin/desk/isCome'); ?>", {'job_id': id, 'job_get_sn': sn}, function (res) {
                if (res == 200) {
                    layer.msg('状态更改成功！', {icon: 1, time: 1000});
                    setTimeout(function () {
                        window.location.reload();
                    }, 1000);
                }
            })
        })
    }

</script>
</html>